package cn.bcsp.mapper;

import cn.bcsp.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {


    int selectOOne(@Param("account") String account);


    SysUser selectById(int id);

    SysUser selectSysUser(@Param("account") String account,
                          @Param("password") String password);

    //分页查询的记录数
    int count(@Param("realName") String realName, @Param("roleId") int roleId);


    //分页查询的当前页的数据
    List<SysUser> selectSysUsers(@Param("realName") String realName,
                                 @Param("roleId") int roleId,
                                 @Param("startRow") int startRow,
                                 @Param("pageSize") int pageSize);

    //新增用户
    int insertSysUser(SysUser sysUser);

    int updateSysUser(SysUser sysUser);

    int deleteById(@Param("id") Integer id);

}